package com.csdj.shop.mapper;

import com.csdj.shop.entity.User;
import org.apache.ibatis.annotations.Param;

/**
 * author:cloud
 * date:2021/2/26 0026
 **/
public interface UserMapper {

    /**
     * 用户注册
     * @param user
     * @return
     */
    int regUser(User user);

    /**
     * 用户登录
     * @param username
     * @param password md5加密
     * @return
     */
    User login(@Param("username")String username,@Param("password")String password);

    /**
     * 修改用户信息
     * @param user
     * @return
     */
    int update(User user);

    /**
     * 查询用户名是否存在
     * @param username
     * @return
     */
    int findCountByUsername(String username);
}
